home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
Xm
/
Uil.z
/
Uil
Wrap
Text File
|
1998-10-30
|
15KB
|
331 lines
UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))
NNNNAAAAMMMMEEEE
UUUUiiiillll - Invokes the UIL compiler from within an application
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
#include <uil/UilDef.h>
UUUUiiiillll____ssssttttaaaattttuuuussss____ttttyyyyppppeeee UUUUiiiillll(
UUUUiiiillll____ccccoooommmmmmmmaaaannnndddd____ttttyyyyppppeeee ****ccccoooommmmmmmmaaaannnndddd____ddddeeeesssscccc,
UUUUiiiillll____ccccoooommmmppppiiiilllleeee____ddddeeeesssscccc____ttttyyyyppppeeee ********ccccoooommmmppppiiiilllleeee____ddddeeeesssscccc,
UUUUiiiillll____ccccoooonnnnttttiiiinnnnuuuueeee____ttttyyyyppppeeee ((((****mmmmeeeessssssssaaaaggggeeee____ccccbbbb) (),
cccchhhhaaaarrrr ****mmmmeeeessssssssaaaaggggeeee____ddddaaaattttaaaa,
UUUUiiiillll____ccccoooonnnnttttiiiinnnnuuuueeee____ttttyyyyppppeeee ((((****ssssttttaaaattttuuuussss____ccccbbbb) (),
cccchhhhaaaarrrr ****ssssttttaaaattttuuuussss____ddddaaaattttaaaa);
VVVVEEEERRRRSSSSIIIIOOOONNNN
This page documents Motif 2.1.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The UUUUiiiillll function provides a callable entry point for the UIL
compiler. The UUUUiiiillll callable interface can be used to process
a UIL source file and to generate UID files, as well as
return a detailed description of the UIL source module in
the form of a symbol table (parse tree).
_c_o_m_m_a_n_d__d_e_s_c
Specifies the uuuuiiiillll command line.
_c_o_m_p_i_l_e__d_e_s_c
Returns the results of the compilation.
_m_e_s_s_a_g_e__c_b
Specifies a callback function that is called when
the compiler encounters errors in the UIL source.
_m_e_s_s_a_g_e__d_a_t_a
Specifies user data that is passed to the message
callback function (_m_e_s_s_a_g_e__c_b). Note that this
argument is not interpreted by UIL, and is used
exclusively by the calling application.
_s_t_a_t_u_s__c_b Specifies a callback function that is called to
allow X applications to service X events such as
updating the screen. This function is called at
various check points, which have been hard coded
into the UIL compiler. The _s_t_a_t_u_s__u_p_d_a_t_e__d_e_l_a_y
argument in _c_o_m_m_a_n_d__d_e_s_cspecifies the number of
check points to be passed before the _s_t_a_t_u_s__c_b
function is invoked.
_s_t_a_t_u_s__d_a_t_a
Specifies user data that is passed to the status
callback function (_s_t_a_t_u_s__c_b).Note that this
Page 1 (printed 10/24/98)
UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))
argument is not interpreted by the UIL compiler
and is used exclusively by the calling
application.
Following are the data structures _U_i_l__c_o_m_m_a_n_d__t_y_p_e and
_U_i_l__c_o_m_p_i_l_e__d_e_s_c__t_y_p_e:
typedef struct Uil_command_type {
char *source_file;
/* single source to compile */
char *resource_file; /* name of output file */
char *listing_file; /* name of listing file */
unsigned int *include_dir_count;
/* number of dirs. in include_dir */
char *((*include_dir) []);
/* dir. to search for include files */
unsigned listing_file_flag: 1;
/* produce a listing */
unsigned resource_file_flag: 1;
/* generate UID output */
unsigned machine_code_flag: 1;
/* generate machine code */
unsigned report_info_msg_flag: 1;
/* report info messages */
unsigned report_warn_msg_flag: 1;
/* report warnings */
unsigned parse_tree_flag: 1;
/* generate parse tree */
unsigned int status_update_delay;
/* number of times a status point is */
/* passed before calling status_cb */
/* function 0 means called every time */
char *database;
/* name of database file */
unsigned database_flag: 1;
/* read a new database file */
unsigned use_setlocale_flag: 1;
/* enable calls to setlocale */
};
typedef struct Uil_compile_desc_type {
unsigned int compiler_version;
/* version number of compiler */
unsigned int data_version;
/* version number of structures */
char *parse_tree_root; /* parse tree output */
unsigned int message_count [Uil_k_max_status+1];
/* array of severity counts */
};
Following is a description of the message callback function
specified by _m_e_s_s_a_g_e__c_b:
Page 2 (printed 10/24/98)
UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))
Uil_continue_type (*_m_e_s_s_a_g_e__c_b) (_m_e_s_s_a_g_e__d_a_t_a, _m_e_s_s_a_g_e__n_u_m_b_e_r, _s_e_v_e_r_i_t_y, _m_s_g__b_u_f_f_e_r,
_s_r_c__b_u_f_f_e_r, _p_t_r__b_u_f_f_e_r, _l_o_c__b_u_f_f_e_r, _m_e_s_s_a_g_e__c_o_u_n_t)
char *_m_e_s_s_a_g_e__d_a_t_a;
int _m_e_s_s_a_g_e__n_u_m_b_e_r;
int _s_e_v_e_r_i_t_y;
char *_m_s_g__b_u_f_f_e_r, *_s_r_c__b_u_f_f_e_r;
char *_p_t_r__b_u_f_f_e_r, *_l_o_c__b_u_f_f_e_r;
int _m_e_s_s_a_g_e__c_o_u_n_t[];
This function specifies a callback function that UIL invokes
instead of printing an error message when the compiler
encounters an error in the UIL source. The callback should
return one of the following values:
_U_i_l__k__t_e_r_m_i_n_a_t_e
Terminate processing of the source file
_U_i_l__k__c_o_n_t_i_n_u_e
Continue processing the source file
The arguments are
_m_e_s_s_a_g_e__d_a_t_a
Data supplied by the application as the
_m_e_s_s_a_g_e__d_a_t_a argument to the UUUUiiiillll function. UIL
does not interpret this data in any way; it just
passes it to the callback.
_m_e_s_s_a_g_e__n_u_m_b_e_r
An index into a table of error messages and
severities for internal use by UIL.
_s_e_v_e_r_i_t_y An integer that indicates the severity of the
error. The possible values are the status
constants returned by the UUUUiiiillllfunction. See RRRReeeettttuuuurrrrnnnn
VVVVaaaalllluuuueeee for more information.
_m_s_g__b_u_f_f_e_r
A string that describes the error.
_s_r_c__b_u_f_f_e_r
A string consisting of the source line where the
error occurred. This string is not always
available. In this case, the argument is NULL.
_p_t_r__b_u_f_f_e_r
A string consisting of whitespace and a printing
character in the character position corresponding
to the column of the source line where the error
occurred. This string may be printed beneath the
source line to provide a visual indication of the
column where the error occurred. This string is
Page 3 (printed 10/24/98)
UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))
not always available. In this case, the argument
is NULL.
_l_o_c__b_u_f_f_e_r
A string identifying the line number and file of
the source line where the error occurred. This is
not always available; the argument is then NULL.
_m_e_s_s_a_g_e__c_o_u_n_t
An array of integers containing the number of
diagnostic messages issued thus far for each
severity level. To find the number of messages
issued for the current severity level, use the
_s_e_v_e_r_i_t_y argument as the index into this array.
Following is a description of the status callback function
specified by _s_t_a_t_u_s__c_b:
Uil_continue_type (*_s_t_a_t_u_s__c_b) (_s_t_a_t_u_s__d_a_t_a, _p_e_r_c_e_n_t__c_o_m_p_l_e_t_e,
_l_i_n_e_s__p_r_o_c_e_s_s_e_d, _c_u_r_r_e_n_t__f_i_l_e, _m_e_s_s_a_g_e__c_o_u_n_t)
char *_s_t_a_t_u_s__d_a_t_a;
int _p_e_r_c_e_n_t__c_o_m_p_l_e_t_e;
int _l_i_n_e_s__p_r_o_c_e_s_s_e_d;
char *_c_u_r_r_e_n_t__f_i_l_e;
int _m_e_s_s_a_g_e__c_o_u_n_t[];
This function specifies a callback function that is invoked
to allow X applications to service X events such as updating
the screen. The callback should return one of the following
values:
_U_i_l__k__t_e_r_m_i_n_a_t_e
Terminate processing of the source file
_U_i_l__k__c_o_n_t_i_n_u_e
Continue processing the source file
The arguments are
_s_t_a_t_u_s__d_a_t_a
Data supplied by the application as the
_s_t_a_t_u_s__d_a_t_a argument to the UUUUiiiillll function. UIL
does not interpret this data in any way; it just
passes it to the callback.
_p_e_r_c_e_n_t__c_o_m_p_l_e_t_e
An integer indicating what percentage of the
current source file has been processed so far.
_l_i_n_e_s__p_r_o_c_e_s_s_e_d
An integer indicating how many lines of the
current source file have been read so far.
Page 4 (printed 10/24/98)
UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))
_c_u_r_r_e_n_t__f_i_l_e
A string containing the pathname of the current
source file.
_m_e_s_s_a_g_e__c_o_u_n_t
An array of integers containing the number of
diagnostic messages issued thus far for each
severity level. To find the number of messages
issued for a given severity level, use the
severity level as the index into this array. The
possible severity levels are the status constants
returned by the UUUUiiiillll function. See RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeee
for more information.
RRRREEEETTTTUUUURRRRNNNN
This function returns one of the following status return
constants:
_U_i_l__k__s_u_c_c_e_s_s__s_t_a_t_u_s
The operation succeeded.
_U_i_l__k__i_n_f_o__s_t_a_t_u_s
The operation succeeded. An informational message
is returned.
_U_i_l__k__w_a_r_n_i_n_g__s_t_a_t_u_s
The operation succeeded. A warning message is
returned.
_U_i_l__k__e_r_r_o_r__s_t_a_t_u_s
The operation failed due to an error.
_U_i_l__k__s_e_v_e_r_e__s_t_a_t_u_s
The operation failed due to an error.
RRRREEEELLLLAAAATTTTEEEEDDDD
UUUUiiiillllDDDDuuuummmmppppSSSSyyyymmmmbbbboooollllTTTTaaaabbbblllleeee(3) and uuuuiiiillll(1).
Page 5 (printed 10/24/98)